﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;

public class UI1 : MonoBehaviour
{

    [SerializeField]
    private Transform Setting;
    [SerializeField]
    private Transform Introduction;


    // Start is called before the first frame update
    void Start()
    {
        Setting = transform.Find("设置界面");
        Introduction = transform.Find("介绍界面");
    }

    // Update is called once per frame
    void Update()
    {

    }
    public void Begin()
    {
        SceneManager.LoadScene(1);
    }
    public void SettingOP()
    {
        Setting.gameObject.SetActive(true);
    }
    public void SettingCS()
    {
        Setting.gameObject.SetActive(false);
    }
    public void IntroductionOP()
    {
        Introduction.gameObject.SetActive(true);
    }
    public void IntroductionCS()
    {
        Introduction.gameObject.SetActive(false);
    }
    public void StartExitDelay()
    {
        Invoke("Leave", 1f);
    }

    public void Leave()
    {
        UnityEngine.Application.Quit();
        Debug.Log("游戏已退出");
    }
}

